package com.hhp.hhptt.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.util.Date;

@Data
//指定对象对应的表名，特别是表名和对象名不一致的情况
@TableName("user")
public class User {
    @TableId("id")
    private Integer id;
    private String username;

    @JsonIgnore
    private String password;
    private String nickname;
    private String email;

    @TableField("phone") //指定数据库字段别名
    private String phone;
    private String address;

    @JsonIgnore
    private Date createtime;

}
